{{--@foreach($services as $service)--}}
{{--<div style='border:solid 1px #ff0000'>--}}
{{--<img style="width: 80px;height: 80px;"  src="{{ $PATH }}{{ $service->work->avatar }}">--}}
{{--@if($service->type == 1)--}}
{{--试用申请--}}
{{--@endif--}}

{{--@if($service->state == 1)--}}
{{--提交日期--}}
{{--@elseif($service->state == 2)--}}
{{--派单日期--}}
{{--@elseif($service->state == 3)--}}
{{--上门日期--}}
{{--@endif--}}

{{--{{ $service->updated_at }}--}}
{{--</div>--}}
{{--@endforeach--}}


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>雷谛科技</title>
<meta name="viewport" content="width=device-width,initial-scale=1" />
<link rel="stylesheet" type="text/css" href="{{ URL::asset('newstyle/css/drink.css') }}" />

</head>
<body>
<header id="header">
  <a href="{{ route('customers.index') }}">
    <img src="{{ URL::asset('newstyle/images/arrow_left.png') }}" alt="" width="8" class="arrow_left">
  </a>
  <h3>@if($type == 'final')已完成工单@else工单管理@endif</h3>
</header>

@foreach($services as $service)

<div class="manage">
  <p>
        @if($service->type == 1)
        <i class="fa fa-gift"></i> 试用
        @elseif($service->type == 10)
        <i class="fa fa-gift"></i> 签约
        @elseif($service->type == 11)
        <i class="fa fa-trash"></i> 拆机
        @elseif($service->type == 12)
        <i class="fa fa-wrench"></i> 维修
        @elseif($service->type == 13)
        <i class="fa fa-refresh"></i> 换芯
        @endif
        工单<span>
                            @if($service->state == 1)
                           待派单
                           @elseif($service->state == 2)
                           已派单
                           @elseif($service->state == 3  && $service->rate_id == 0)
                           完成待评
                           @else
                           {{ $service->rate->form1 }}星
                           @endif
        </span>
    </p>
</div>
<section id="section7" class="cl">
  <ul>
    <li>
      <a href="{{ route('services.show',$service->id) }}">
        <img src="{{ $PATH }}{{ $service->mount->machine->cover }}-machine" alt="" width="90" class="product1">
        <h4>型号:{{ $service->mount->machine->name }}</h4>
        <p class="machine_code">机器编码：{{ $service->mount->code }}</p>
        <p><img src="{{ URL::asset('newstyle/images/cleck.png') }}" alt="" width='12' align="absmiddle">初装日期：{{ substr($service->mount->created_at,0,-9) }}</p>
        <p><img src="{{ URL::asset('newstyle/images/map.png') }}" alt="" width="10" align="absmiddle">地址：{{ $service->mount->xiaoqu->name }}{{ $service->mount->address }}</p>
      </a>
    </li>
  </ul>
</section>







@if($service->state == 1)

<div class="send">
  <p>正在为您紧急派单中...</p>
  <!--<p>取消订单</p>-->
</div>
@else
<div class="cancel">
    <ul>
        <li>
            <a href="">
                <img src="{{ $service->work->avatar }}" alt="" width="70" class="worker">
                <p>服务人员：{{ $service->work->name }}</p>
                <p><img src="{{ URL::asset('newstyle/images/earphone.png') }}" alt="" width="8" align="absmiddle">{{ $service->work->mobile }}</p>
            </a>
            <a href="tel:{{ $service->work->mobile }}" class="tel">一键拨号</a>
        </li>
    </ul>

    <!--<div class="order cl">-->
    <!--<p>取消订单</p>-->
    <!--<p>确认订单</p>-->
    <!--</div>-->
</div>
@endif

@endforeach

</body>
</html>
